<template>
  <div class="app-menu-item">
    <i
      v-if="item.icon"
      :class="{ [item.icon]: true, 'app-menu-item-icon': true }"
    ></i>
    <span class="app-menu-item-title">{{ item.title }}</span>
  </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";

@Component
export default class MenuItem extends Vue {

  @Prop({ type: Object, default: {} })item!: any;

}
</script>

<style lang="less" scoped>
.app-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  > .app-menu-item-icon {
    padding-right: 4px;
  }
  > .app-menu-item-title{
    display: inline-block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
</style>
